package com.cskaoyan.order.dal.persistence;


import com.cskaoyan.order.dal.entitys.Order;
import com.cskaoyan.user.dal.entitys.Member;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface OrderMapper extends Mapper<Order> {
    Long countAll();

    List<Order> selectAllOrderBySortDesc(@Param("startPage") Integer startPage, @Param("size") Integer size, @Param("sort") String sort, @Param("uid") Long uid);


    int updateOrderByOrderId(@Param("order") Order order);

    String selectStatusByOrderId(@Param("orderId") String orderId);

    int deleteOrderByOrderId(@Param("orderId") String orderId);


    int countAllByUid(Long uid);

    Member selectMemberByUid(@Param("uid") Long uid);
}